<style>
        .dataSearchKqTable {
            width: 100%;
            border:1px solid #FFF;
            border-right: none;
        }
        .dataSearchKqTable thead {
            width: 100%;
            background-color: #2669B1;
            color: #fff;
        }
        .dataSearchKqTable thead th {
            height: 30px;
            line-height: 30px;
            border-right: 1px solid #FFF;
        }
        .dataSearchKqTable tbody tr {
            border-top: 1px solid #FFF;
            background-color: #D3E5FF;
        }
        .dataSearchKqTable tbody tr td {
            height: 30px;
            line-height: 30px;
            border-right: 1px solid #FFF;
        }
        .dataSearchKqTable tbody tr td select {
            height: 30px;
        }
        .dataSearchKqTable tbody tr .data-td {
            min-width:30px;
            text-align: center; 
        }
        .dateYellow {
            background-color: #FEB726;
        }
        .dateGreen {
            background-color: #62B87A;
        }
        .hide {
            display: none;
        }
        .dataSearchKqTable .showInput {
            width: 100%;
        }
        .dataSearchKqTable .layui-form-checkbox {
            padding-left: 0px;
        }
    </style>
    <script type="text/html" template lay-done="layui.data.dataSearchKqTable(d);">
        <table class="dataSearchKqTable layui-form" data-id={{d.params.basic.taskid}}>
                <thead>
                    <tr>
                        <!-- <th>
                            <input type="checkbox" lay-filter="checkAll" class="T-checkAll" lay-skin="primary">
                        </th> -->
                        <th><div style="min-width:50px;text-align:center;white-space:nowrap;">姓名</div></th>
                        <th><div style="min-width:40px;text-align:center;white-space:nowrap;">日期</div></th>
                    {{#
                        if(d.params.dates) {
                            layui.each(d.params.dates, function(index,item) {
                            var tdclass = item.state === '0' ? 'dateYellow' : 'dateGreen';
                    }}
                        <th class={{tdclass}}>{{item.day}}</th>
                    {{#
                            })
                        }
                    }}
                    </tr>
                </thead>
                <tbody>
                    {{#
                        var basic = d.params.basic || {};
                        if(d.params.users) {
                            layui.each(d.params.users, function(index,item) {
                    }}
                    <tr class='T-firstTr' data-id='{{","+item.writeid}}'>
                        <!-- <td rowspan="2"><div style="width:32px;text-align: center;">
                            <input type="checkbox" class="T-isChecked" lay-skin="primary">
                        </div></td> -->
                        <td rowspan="2" class="trbasic" style="text-align: center;vertical-align:middle;white-space:nowrap;">
                            {{item.writeusername}}
                            <input type="text" class="hide" name="dept_code" value={{basic.dept_code}} >
                            <input type="text" class="hide" name="dept_name" value={{basic.dept_name}} >
                            <input type="text" class="hide" name="dept_id" value={{basic.dept_id}} >
                            <input type="text" class="hide" name="dataid" value={{item.dataid}} >
                            <input type="text" class="hide" name="writeid" value={{item.writeid}} >
                            <input type="text" class="hide" name="writeuserid" value={{item.writeuserid}} >
                            <input type="text" class="hide" name="writeusername" value={{item.writeusername}} >
                        </td>
                        <td style="text-align: center;">上午</td>
                    {{#
                        layui.each(item.users_time[0].users_time_day, function(dndex,dtem) {
                    }}
                        <td><div style="min-width:50px;text-align: center;" class="T-dateInfo">
                            <input class="hide" type="text" name="symbol" value={{dtem.symbol}}>
                            <input type="text" class="hide" name="time" value={{dtem.date}}>
                            <input type="text" class="hide" name="time_sort" value='1' >
                        </div></td>
                    {{#
                        })
                    }}
                    </tr>
                    <tr>
                        <td style="text-align: center;">下午</td>
                        {{#
                            layui.each(item.users_time[1].users_time_day, function(index,dtem) {
                        }}
                            <td><div style="min-width:50px;text-align: center;" class="T-dateInfo">
                                <input class="hide" type="text" name="symbol" value={{dtem.symbol}}>
                                <input type="text" class="hide" name="time" value={{dtem.date}} >
                                <input type="text" class="hide" name="time_sort" value='2' >
                            </div></td>
                        {{#
                            })
                        }}
                    </tr>
                    {{#
                            })
                        }
                    }}
                </tbody>
                </table>
    </script>
    <script>
        layui.data.dataSearchKqTable = function (d) { 
            layui.use(['admin', 'form', 'tools'], function(){
                var $ = layui.$,
                    form = layui.form,
                    tData = d.params.data;
                form.render();
                form.on('checkbox(checkAll)', function(data){
                    var isChecked = data.elem.checked;
                    $('.T-isChecked').prop('checked', isChecked);
                    form.render();
                }); 
            });
        }
    </script>